import { type ComponentConfigModel } from '/@/views/formDesigner/utils';

export default {
  component: async () => await import('./index.vue'),
  defaultSchema: {
    label: '页面',
    type: 'page',
    componentProps: {},
    children: [],
  },
  config: {
    attribute: [
      {
        label: '页面宽度',
        type: 'EInputSize',
        componentProps: {
          placeholder: '请输入',
        },
        field: 'width',
      },
      {
        label: '显示框线',
        type: 'radio',
        field: 'isBorder',
        defaultValue: false,
        componentProps: {
          defaultValue: false,
          options: [
            {
              label: '否',
              value: false,
            },
            {
              label: '是',
              value: true,
            },
          ],
        },
      },
      {
        label: '框线颜色',
        type: 'color-picker',
        field: 'borderColor',
        defaultValue: 'rgb(255, 0, 0)',
        componentProps: {
          type: 'color',
          style: {
            // width: '60px'
          },
        },
        show: ({ values }) => {
          return values.isBorder;
        },
      },
      // {
      //   label: '页面名称',
      //   type: 'input',
      //   componentProps: {
      //     placeholder: '请输入',
      //   },
      //   field: 'name',
      // },
    ],
  },
} as ComponentConfigModel;
